from django.shortcuts import render
from rest_framework.views import  APIView
from rest_framework import response
from . import serializers
from .models import Sample
from .serializers import  SampleSerializer
# Create your views here.
def register(request):
    return None


def login(request):
    return None



class SampleList(APIView):
    def get(self, request):
        serializer = serializers.SampleSerializer(Sample.objects.all(), many=True)
        # print("数据",serializer.data)
        return response.Response(serializer.data)




